home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / blitzbasic / riblitzlibs.lha / riblitzlibs / reqlib / Req_Library.doc next >
Text File  |  1980-01-03  |  7KB  |  170 lines

  1. ;------------------------------
  2. ;- ReqLib.library version 0.9 -
  3. ;- ©1994 Reflective Images    -
  4. ;------------------------------
  5.  
  6. The well known Req.Library for the Amiga is one of the best file requesters
  7. around, so I wrote this small lib to enable Blitz users to have Req
  8. requesters in their programs with the minimum of hassle.
  9.  
  10. * PLEASE NOTE * That this library must have at least v2.2 of the Req.Library
  11. available.
  12.  
  13. Command List:
  14.  
  15.     ReqOutput()
  16.     ReqFileRequest()
  17.     ReqFileLoc()
  18.  
  19.  
  20. Statement: ReqOutput
  21. ------------------------------------------------------------------------------
  22. Modes  : Amiga
  23. Syntax : ReqOutput windownumber
  24.  
  25. This command sets the ReqLib.library to put all requesters onto the
  26. window specified by <windownumber>. If this command is not called
  27. then the requesters will appear on the Default Public Screen.
  28.  
  29.  
  30. Function: ReqFileRequest
  31. ------------------------------------------------------------------------------
  32. Modes  : Amiga
  33. Syntax : pathname$=ReqFileRequest([title$[,flags]])
  34.  
  35. This opens up the standard file requester. If <title$> is given then
  36. the text will appear on the requester title bar.
  37. The optional <flags> parameter specifies a flag setting (see below)
  38. for use. If this is omitted then the last flag setting is used.
  39.  
  40.  
  41. Function: ReqFileLoc
  42. ------------------------------------------------------------------------------
  43. Modes  : Amiga/Blitz
  44. Syntax : memorylocation.l=ReqFileLoc
  45.  
  46. This simply returns the address in memory where the Req.Library file requester
  47. stucture is located.
  48.  
  49.  
  50.  
  51. FLAGS
  52. =====
  53.  
  54. Below is a list of possible flag settings and a brief description of each.
  55.  
  56.  
  57. #FRQSHOWINFOB     = %1   ;Set to show .info files. Default is not.
  58. #FRQEXTSELECTB    = %10   ;Extended select.  Default is not.
  59. #FRQCACHINGB      = %100   ;Directory caching.  Default is not.
  60. #FRQGETFONTSB     = %1000   ;Font requester rather than a file requester.
  61. #FRQINFOGADGETB   = %10000   ;Hide-info files gadget.
  62. #FRQHIDEWILDSB    = %100000   ;DON'T want 'show' and 'hide' string gadgets.
  63. #FRQABSOLUTEXYB   = %1000000   ;Use absolute x,y positions rather than centering on mouse.
  64. #FRQCACHEPURGEB   = %10000000   ;Purge the cache whenever the directory date stamp changes if this is set.
  65. #FRQNOHALFCACHEB  = %100000000   ;Don't cache a directory unless it is completely read in when this is set.
  66. #FRQNOSORTB       = %1000000000   ;DON'T want sorted directories.
  67. #FRQNODRAGB       = %10000000000  ;DON'T want a drag bar and depth gadgets.
  68. #FRQSAVINGB       = %100000000000  ;Are selecting a file to save to.
  69. #FRQLOADINGB      = %1000000000000  ;Are selecting a file(s) to load from.
  70. #FRQDIRONLYB      = %10000000000000  ;Allow the user to select a directory, rather than a file.
  71.  
  72.  
  73. STRUCTURE
  74. =========
  75.  
  76. Below is a description of the Req.Library file requester structure.
  77.  
  78. STRUCTURE    AFileRequester,0
  79.     UWORD    frq_VersionNumber        ;MUST BE REQVERSION!!!!!!!!!!!!!!!!!!
  80.  
  81.     ;You will probably want to initialize these three variables.
  82.     APTR    frq_Title            ; Hailing text
  83.     APTR    frq_Dir                ; Directory array (must be DSIZE+1 characters long)
  84.     APTR    frq_File            ; Filename array (must be FCHARS+1 characters long)
  85.     ;If you initialize this variable then the file requester will place the complete path name in here on exit.
  86.     APTR    frq_PathName            ; Complete path name array - (must be DSIZE+FCHARS+2 long)
  87.     ;If you want the file requester to pop up on your custom screen, put one of your window pointers here.
  88.     ;Or better yet, you can leave this field zeroed and put a pointer to one of your windows in the
  89.     ;pr_WindowPtr field in your process structure.
  90.     APTR    frq_Window            ; Window requesting or NULL
  91.     ;Initialize these to the number of lines and columns you want to appear in the inner window that
  92.     ;displays the file names.  If you leave these set to zero then default values will be used.
  93.     UWORD    frq_MaxExtendedSelect        ; Zero implies a maximum of 65535, as long as FRQEXTSELECT is set.
  94.     UWORD    frq_numlines            ; Number of lines in file window.
  95.     UWORD    frq_numcolumns            ; Number of columns in file window.
  96.     UWORD    frq_devcolumns            ; Number of columns in device window.
  97.     ULONG    frq_Flags            ; Various - umm - flags.  See above for more info.
  98.     UWORD    frq_dirnamescolor    ;These five colors will all default
  99.     UWORD    frq_filenamescolor    ;to color one if you don't specify
  100.     UWORD    frq_devicenamescolor    ;a color (ie; if you specify color zero).
  101.     UWORD    frq_fontnamescolor    ;If you want color zero to be used, specify
  102.     UWORD    frq_fontsizescolor    ;color 32, or some other too large number
  103.                     ;which mods down to zero.
  104.  
  105.     UWORD    frq_detailcolor        ;If both of these colors are specified as
  106.     UWORD    frq_blockcolor        ;zero then the block pen will be set to one.
  107.  
  108.     UWORD    frq_gadgettextcolor    ;The color for the text of the five boolean gadgets.  Defaults to 1.
  109.     UWORD    frq_textmessagecolor    ;The color for the message at the screen top.  Defaults to 1.
  110.     UWORD    frq_stringnamecolor    ;The color for the words Drawer, File, Hide and Show.  Defaults to 3.
  111.     UWORD    frq_stringgadgetcolor    ;The color for the borders of the string gadgets.  Defaults to 3.
  112.                     ;Unfortunately it is not possible to specify
  113.                     ;the color of the actual text in an Intuition
  114.                     ;string gadget.
  115.     UWORD    frq_boxbordercolor    ;The color for the boxes around the file and directory areas.  Defaults to 3.
  116.     UWORD    frq_gadgetboxcolor    ;The color for the boxes around the five boolean gadgets.  Defaults to 3.
  117.  
  118.     STRUCT    frq_RFU_Stuff,36        ;This area, which is reserved for
  119.                         ;future use, should all be zero.
  120.  
  121.     STRUCT    frq_DirDateStamp,ds_SIZEOF    ; A copy of the cached directories date stamp.
  122.                         ; There should never be any need to change this.
  123.  
  124.     UWORD    frq_WindowLeftEdge;        ;These two fields are only used when the
  125.     UWORD    frq_WindowTopEdge;        ;FRQABSOLUTEXY flag is set.  They specify
  126.                         ;the location of the upper left hand
  127.                         ;corner of the window.
  128.  
  129.     UWORD    frq_FontYSize            ;These fields are used to return the selected
  130.     UWORD    frq_FontStyle            ;font size and style, only applicable when the
  131.                         ;font bit is set.
  132.  
  133.     ;If you set the extended select bit and the user extended selects, the list of filenames will start from here.
  134.     APTR    frq_ExtendedSelect        ; Linked list of ESStructures if more than one filename is chosen.
  135.     ;All of the following variables you shouldn't need to touch.  They contain fields that the file
  136.     ;requester sets and likes to preserve over calls, just to make life easier for the user.
  137.     STRUCT    frq_Hide,WILDLENGTH+2        ; Wildcards for files to hide.
  138.     STRUCT    frq_Show,WILDLENGTH+2        ; Wildcards for files to show.
  139.     WORD    frq_FileBufferPos        ; Cursor's  position  and first
  140.     WORD    frq_FileDispPos            ; displayed character number in
  141.     WORD    frq_DirBufferPos        ; the three string gadgets.  No
  142.     WORD    frq_DirDispPos            ; need  to initialized these if
  143.     WORD    frq_HideBufferPos        ; you don't want to.
  144.     WORD    frq_HideDispPos
  145.     WORD    frq_ShowBufferPos
  146.     WORD    frq_ShowDispPos
  147.  
  148. ;         The  following  fields are PRIVATE!  Don't go messing with them or
  149. ; wierd  things may/will happen.  If this isn't enough of a warning, go read
  150. ; the one in intuition.h, that should scare you off.
  151.  
  152.     APTR    frq_Memory            ; Memory allocated for dir entries.
  153.     APTR    frq_Memory2            ; Used for currently hidden files.
  154.     APTR    frq_Lock            ; Contains lock on directories being read across calls.
  155.     STRUCT    frq_PrivateDirBuffer,DSIZE+2    ; Used for keeping a record of which
  156.                         ; directory we have file names for.
  157.     APTR    frq_FileInfoBlock
  158.     WORD    frq_NumEntries
  159.     WORD    frq_NumHiddenEntries
  160.     WORD    frq_filestartnumber
  161.     WORD    frq_devicestartnumber
  162.     LABEL    frq_SIZEOF
  163.  
  164.  
  165.  
  166. Enjoy!
  167.  
  168. Steve.
  169.  
  170.